package com.tuling.designpattern.flyweight;

/**
 * @author 林瑞涛
 * @desc 客户端
 * @date 2021年07月31日 14:15
 */
public class Client {

    public static void main(String[] args) {
        WebSiteFactory webSiteFactory = new WebSiteFactory();

        WebSite fx = webSiteFactory.getWebSiteCategory("产品展示");
        fx.use();

        WebSite fy = webSiteFactory.getWebSiteCategory("产品展示");
        fy.use();

        WebSite fz = webSiteFactory.getWebSiteCategory("产品展示");
        fz.use();

        WebSite fa = webSiteFactory.getWebSiteCategory("博客");
        fa.use();

        WebSite fb = webSiteFactory.getWebSiteCategory("博客");
        fb.use();

        WebSite fc = webSiteFactory.getWebSiteCategory("博客");
        fc.use();

        System.out.println("网站分类总数：" + webSiteFactory.getWebSiteCount());
    }
}
